home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 52
/
Volume 52 - JOGO DISK .iso
/
Games
/
dancing_princess.swf
/
scripts
/
frame_4
/
DoAction.as
Wrap
Text File
|
2007-09-26
|
8KB
|
292 lines
function sd()
{
ggame_dress1_lc = new LocalConnection();
ggame_dress1_lc.send("lc_name","methodToExecute",buy_str);
}
stop();
var m_name = ["one","up","down","shoes","head","eye","neck","ear","bag","foot"];
var one_dname = "";
var up_dname = "";
var down_dname = "";
var shoes_dname = "";
var head_dname = "";
var eye_dname = "";
var neck_dname = "";
var ear_dname = "";
var bag_dname = "";
var foot_dname = "";
var highest_depth = 0;
make_drag = function()
{
var _loc4_ = 0;
while(_loc4_ < 12)
{
var _loc3_ = 0;
while(_loc3_ < m_name.length)
{
_root[m_name[_loc3_] + "_" + _loc4_].odepth = _root[m_name[_loc3_] + "_" + _loc4_].getDepth();
_root[m_name[_loc3_] + "_" + _loc4_].ox = _root[m_name[_loc3_] + "_" + _loc4_]._x;
_root[m_name[_loc3_] + "_" + _loc4_].oy = _root[m_name[_loc3_] + "_" + _loc4_]._y;
_root[m_name[_loc3_] + "_" + _loc4_].onPress = function()
{
highest_depth++;
this.swapDepths(highest_depth);
this.startDrag();
};
_root[m_name[_loc3_] + "_" + _loc4_].onRelease = function()
{
if(this._droptarget == "/game_ava/hidden_area")
{
drop(this._name);
}
else
{
move_f(this._name,this.ox,this.oy);
}
this.stopDrag();
};
_root[m_name[_loc3_] + "_" + _loc4_].onReleaseOutside = function()
{
if(this._droptarget == "/game_ava/hidden_area")
{
drop(this._name);
}
else
{
move_f(this._name,this.ox,this.oy);
}
this.stopDrag();
};
_loc3_ = _loc3_ + 1;
}
_loc4_ = _loc4_ + 1;
}
};
drop = function(drop_name)
{
so2.start(0,1);
var _loc2_ = drop_name.indexOf("_");
_root[drop_name]._visible = false;
_root.game_ava[drop_name.slice(0,_loc2_) + "_m"].gotoAndStop(parseInt(drop_name.slice(_loc2_ + 1,_loc2_ + 3)) + 2);
if(drop_name.slice(0,_loc2_) == "up")
{
game_ava.underwear_up._visible = false;
_root[one_dname]._visible = true;
_root.game_ava.one_m.gotoAndStop(1);
move_f(one_dname,_root[one_dname].ox,_root[one_dname].oy);
if(one_dname != "")
{
game_ava.underwear_down._visible = true;
}
one_dname = "";
}
else if(drop_name.slice(0,_loc2_) == "down")
{
game_ava.underwear_down._visible = false;
_root[one_dname]._visible = true;
_root.game_ava.one_m.gotoAndStop(1);
move_f(one_dname,_root[one_dname].ox,_root[one_dname].oy);
if(one_dname != "")
{
game_ava.underwear_up._visible = true;
}
one_dname = "";
}
else if(drop_name.slice(0,_loc2_) == "one")
{
game_ava.underwear_up._visible = false;
game_ava.underwear_down._visible = false;
_root[up_dname]._visible = true;
_root.game_ava.up_m.gotoAndStop(1);
move_f(up_dname,_root[up_dname].ox,_root[up_dname].oy);
_root[down_dname]._visible = true;
_root.game_ava.down_m.gotoAndStop(1);
move_f(down_dname,_root[down_dname].ox,_root[down_dname].oy);
up_dname = "";
down_dname = "";
}
_root[_root[drop_name.slice(0,_loc2_) + "_dname"]]._visible = true;
move_f(_root[drop_name.slice(0,_loc2_) + "_dname"],_root[_root[drop_name.slice(0,_loc2_) + "_dname"]].ox,_root[_root[drop_name.slice(0,_loc2_) + "_dname"]].oy);
_root[drop_name.slice(0,_loc2_) + "_dname"] = drop_name;
};
move_f = function(dr_name, xx, yy)
{
_root[dr_name].swapDepths(_root[dr_name].odepth);
var _loc4_ = new mx.transitions.Tween(_root[dr_name],"_x",mx.transitions.easing.Back.easeOut,_root[dr_name]._x,xx,10);
var _loc3_ = new mx.transitions.Tween(_root[dr_name],"_y",mx.transitions.easing.Back.easeOut,_root[dr_name]._y,yy,10);
};
ava_default = function()
{
var _loc2_ = 0;
while(_loc2_ < m_name.length)
{
_root[_root[m_name[_loc2_] + "_dname"]]._visible = true;
_root.game_ava[m_name[_loc2_] + "_m"].gotoAndStop(1);
move_f(_root[m_name[_loc2_] + "_dname"],_root[_root[m_name[_loc2_] + "_dname"]].ox,_root[_root[m_name[_loc2_] + "_dname"]].oy);
_root[m_name[_loc2_] + "_dname"] = "";
_loc2_ = _loc2_ + 1;
}
game_ava.underwear_up._visible = true;
game_ava.underwear_down._visible = true;
};
game_play_bt.onRollOver = function()
{
so1.start(0,1);
this._xscale = 105;
this._yscale = 105;
};
game_play_bt.onRollOut = function()
{
this._xscale = 100;
this._yscale = 100;
};
game_play_bt.onPress = function()
{
so1.start(0,1);
this.gotoAndStop(2);
};
game_play_bt.onRelease = function()
{
this.gotoAndStop(1);
gotoAndStop(5);
};
game_play_bt.onReleaseOutside = function()
{
this.gotoAndStop(1);
gotoAndStop(5);
};
ava_default_bt.onRollOver = function()
{
so1.start(0,1);
this._xscale = 105;
this._yscale = 105;
};
ava_default_bt.onRollOut = function()
{
this._xscale = 100;
this._yscale = 100;
};
ava_default_bt.onPress = function()
{
so1.start(0,1);
this.gotoAndStop(2);
};
ava_default_bt.onRelease = function()
{
this.gotoAndStop(1);
ava_default();
};
ava_default_bt.onReleaseOutside = function()
{
this.gotoAndStop(1);
ava_default();
};
make_drag();
var buy_str = "";
var game_name = "G270030";
var game_price = 3500;
var buy_2 = ["G260048","G260049"];
var buy_3 = ["G250203","G250204","G250205","G250206","G250207","G250208","G250209"];
var buy_4 = ["G240255","G240256","G240257","G240258","G240259","G240260","G240261"];
var buy_5 = ["G230261","G230262","G230263","G230264","G230265","G230266","G230267"];
var buy_6 = ["G220146","G220147","G220148","G220149"];
var buy_7 = ["G210079","G210080","G210081"];
var buy_8 = ["G200046"];
var buy_9 = ["G190053","G190054"];
var buy_11 = ["G170076","G170078","G170075","G170077"];
buy_item = function()
{
foot_m = game_ava.foot_m._currentframe;
shoes_m = game_ava.shoes_m._currentframe;
down_m = game_ava.down_m._currentframe;
up_m = game_ava.up_m._currentframe;
one_m = game_ava.one_m._currentframe;
bag_m = game_ava.bag_m._currentframe;
neck_m = game_ava.neck_m._currentframe;
ear_m = game_ava.ear_m._currentframe;
eye_m = game_ava.eye_m._currentframe;
head_m = game_ava.head_m._currentframe;
var _loc4_ = new Array();
var _loc2_ = 0;
while(_loc2_ < avaStr.length / 7 - 1)
{
var _loc3_ = avaStr.slice((_loc2_ + 1) * 7,(_loc2_ + 1) * 7 + 7);
if((_loc3_.slice(1,3) < 17 || _loc3_.slice(1,3) > 32) && _loc3_.slice(1,3) != 13)
{
_loc4_.push(avaStr.slice((_loc2_ + 1) * 7,(_loc2_ + 1) * 7 + 7));
}
_loc2_ = _loc2_ + 1;
}
var _loc5_ = _loc4_.join("");
buy_str = game_name;
if(foot_m != 1)
{
buy_str += buy_2[foot_m - 2];
}
if(shoes_m != 1)
{
buy_str += buy_3[shoes_m - 2];
}
if(down_m != 1)
{
buy_str += buy_4[down_m - 1];
}
else if(one_m == 1 && down_m == 1)
{
buy_str += buy_4[0];
}
if(up_m != 1)
{
buy_str += buy_5[up_m - 1];
}
else if(one_m == 1 && up_m == 1)
{
buy_str += buy_5[0];
}
if(one_m != 1)
{
buy_str += buy_6[one_m - 2];
}
if(bag_m != 1)
{
buy_str += buy_7[bag_m - 2];
}
if(neck_m != 1)
{
buy_str += buy_8[neck_m - 2];
}
if(ear_m != 1)
{
buy_str += buy_9[ear_m - 2];
}
if(eye_m != 1)
{
buy_str += buy_10[eye_m - 2];
}
if(head_m != 1)
{
buy_str += buy_11[head_m - 2];
}
buy_str = avaStr.slice(0,2) + "1" + avaStr.slice(3,7) + _loc5_ + buy_str;
trace(buy_str);
getURL("JavaScript:GoGAva(\'" + _root.buy_str + "\',\'" + _root.game_price + "\')","");
};
buy_bt.onRollOver = function()
{
this.buy_bt_rollover.gotoAndStop(2);
};
buy_bt.onRollOut = function()
{
this.buy_bt_rollover.gotoAndStop(1);
};
buy_bt.onPress = function()
{
this.gotoAndStop(2);
};
buy_bt.onRelease = buy_bt.onReleaseOutside = function()
{
this.buy_bt_rollover.gotoAndStop(1);
this.gotoAndStop(1);
buy_item();
};